<template>
  <div class="shop-container">
      <v-header :seller="seller">
			</v-header>
	  <div class="tab-bar border-1px">
		  <div class="tab-item">
			  <router-link to="/goods" exact>商品</router-link>
		  </div>
		  <div class="tab-item">
			  <router-link to="/ratings">评价</router-link>
		  </div>
		  <div class="tab-item">
			  <router-link to="/seller">商家</router-link>
		  </div>
	  </div>
    <div class="tab-content">
			<keep-alive>
				<router-view :seller="seller"></router-view>
			</keep-alive>
		</div>
  </div>
</template>

<script type="text/ecmascript">
	import './assets/css/ico.css';
	import Header from '@/components/header';
	import { axAjax, getQueryString } from '@/common/js/utils.js';

	const ERR_OK = 0;
	export default {
		components: {
			'v-header': Header
		},
		data () {
			return {
				seller: {}
			};
		},
		created () {
			let id = getQueryString('id');
			axAjax('/seller', 'get', {id: id})
			.then(res => {
				if (res.errno === ERR_OK) {
					this.seller = res.data;
				}
			});
		}
	};
</script>

<style lang="less" scoped>
	@import './common/less/index.less';
</style>